/*******************************************************************************
 * Copyright (C) 2016. Tripint Information Technology Co., Ltd. All rights reserved. *
 * Authors:lirichen
 * File:DiscussDataService.java
 * This software, including documentation, is protected by copyright controlled
 * by Tripint Information Technology Co., Ltd. All rights are reserved.
 ******************************************************************************/

package com.taorenqi.data.service;


import com.taorenqi.data.common.BasePageableResponse;
import com.taorenqi.data.common.BaseResponse;
import com.taorenqi.data.entity.login.CodeDataEntity;
import com.taorenqi.data.entity.login.LoginEntity;

import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import rx.Observable;

/**
 * Created by lirichen on 16/9/12.
 */
public interface LoginDataService {

    //登录
    @FormUrlEncoded
    @POST("login")
    Observable<BaseResponse<BasePageableResponse<LoginEntity>>> postLogin(
            @Field("mobile") String mobile,
            @Field("password") String password,
            @Field("device") String device,
            @Field("sign") String sign
    );

    //完善资料
    @FormUrlEncoded
    @POST("regisPerfect")
    Observable<BaseResponse<BasePageableResponse<LoginEntity>>> postCompleteInfo(
            @Field("shop_truename") String shop_truename,
            @Field("shop_sex") String shop_sex,
            @Field("shop_wangwang") String shop_wangwang,
            @Field("shop_weixinopenid") String shop_weixinopenid,
            @Field("shop_qq") String shop_qq,
            @Field("enterprise_name") String enterprise_name,
            @Field("enterprise_tel") String enterprise_tel,
            @Field("shop_enterprise_email") String shop_enterprise_email,
            @Field("sign") String sign
    );

    //检测是否注册
    @FormUrlEncoded
    @POST("isReg")
    Observable<BaseResponse<BasePageableResponse<CodeDataEntity>>> postCheckReg(
            @Field("mobile") String mobile,
            @Field("sign") String sign
    );

    //发送验证码
    @FormUrlEncoded
    @POST("sendSms")
    Observable<BaseResponse<BasePageableResponse<CodeDataEntity>>> postSendSms(
            @Field("mobile") String mobile,
            @Field("reg") int reg,
            @Field("sign") String sign
    );

    //修改手机号
    @FormUrlEncoded
    @POST("modifyPhone")
    Observable<BaseResponse<BasePageableResponse<CodeDataEntity>>> postModifyPhone(
            @Field("mobile") String mobile,
            @Field("vcode") String vcode,
            @Field("msgToken") String msgToken,
            @Field("sign") String sign
    );

    //修改密码
    @FormUrlEncoded
    @POST("modifyPwd")
    Observable<BaseResponse<BasePageableResponse<CodeDataEntity>>> postModifyPwd(
            @Field("password") String password,
            @Field("newPassword") String newPassword,
            @Field("sign") String sign
    );



}
